<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

		<!-- .breadcrumb -->
	</div>
	<!-- Main content -->
	<div class="page-content">
    	<div class="row">
    	    <div class="page-header">
    			<h1>车贴图片列表</h1>
    		</div>
    		<div class="col-xs-12">
    		<a class="btn btn-sm" href="javascript:void(0)" onclick="javascript :history.back(-1);"><i class="icon-undo"></i>返回</a>
            </div>
            <div class="col-xs-12 margin_t margin_b">
				<div class="table-responsive  tab">
					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th class="center" style="width: 3%;">
									<label>
										<input type="checkbox" class="ace" />
										<span class="lbl"></span>
									</label>
								</th>
								<th>车贴图片</th>
                                <th>审核状态</th>
                                <th>上传时间</th>
                                <th style="width: 25%;">操作</th>
							</tr>
						</thead> 
						<tbody>
						<?php if (isset($result)&&count($result)>0){
                            	foreach ($result as $app){
                            	?>
							<tr>
								<td class="center">
                                	<p>
									<label>
										<input type="checkbox" class="ace" name="num[]" value="<?php echo $app->id;?>"/>
										<span class="lbl"></span>
									</label>
                                    </p>
								</td>
                                <td>
                                <div class="example">
									<p><img src="<?php echo $app->img_url;?>" class="img-rounded" style="width: 100px;" alt=""></p>
								</div>
                                </td>
                                <td><p><?php 
                                	if($app->status == 0){
                                		echo "待审核";
                                	}elseif($app->status == 1){
                                		echo "审核完成";
                                	}elseif ($app->status == 2){
                                		echo "审核拒绝";
                                	}
                                	?></p>
                                </td>
                                <td><p><?php echo $app->create_time;?></p></td>
                                <td>
                                	<p>
                                    <a href="<?php echo base_url().'admin/user/car_img_status/1/'.$app->car_id.'/'.$app->id;?>" class="btn btn-info btn-sm"><i class="icon-list"></i>审核通过</a>
                                    <a href="<?php echo base_url().'admin/user/car_img_status/2/'.$app->car_id.'/'.$app->id;?>" class="btn btn-info btn-sm"><i class="icon-list"></i>审核拒绝</a>
                                    <a href="javascript:void(0)" onclick="delmodal('<?php echo $app->id;?>','<?php echo $app->car_id;?>')" data-toggle="modal" class="btn btn-danger btn-sm"><i class="icon-trash"></i>删除</a>
                                    </p>
                                </td>
    						</tr>
    						<?php }
                            }else{?>
                            <tr>
                            	<td colspan="11">无数据</td>
                            </tr>
                            <?php }?>
                            </tbody>
                         </table>
                     </div><!-- /.table-responsive -->
				</div>
                <div class="col-sm-12">
                	<div class="modal-footer no-margin-top">
	                	<div class="pull-left record">
							共<?php echo count($result);?>条记录
	                    </div>
                	</div>
                </div>
            </div><!-- /.row -->
		</div><!-- /.page-content -->
	</div><!-- /.main-content -->
	<div id="delModal" class="modal fade" role="dialog" aria-hidden="true">
		<div class="modal-dialog" style="width: 300px">
			<div class="modal-content">
				<div class="modal-header">
				  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				  <h3>提示信息</h3>
				</div>
				<div class="modal-body">
				  <p>确定要删除吗？</p>
				</div>
				<div class="modal-footer">
				  <a id="delbtn" href="#" class="btn btn-danger">确定</a>
				  <a href="#" class="btn btn-info" data-dismiss="modal" aria-hidden="true">取消</a>
				</div>
			</div>
		</div>
	</div>
	<script src="<?php echo base_url()?>themes/default/js/jquery-2.1.1.min.js" type="text/javascript"></script>
	<script src="<?php echo base_url()?>themes/default/dist/zoomify.min.js"></script>
	<script type="text/javascript">
	function delmodal(id,car_id){
		$("#delbtn").attr('href','<?php echo base_url().'admin/user/del_user_car_img/'?>'+car_id+'/'+id);
	    $('#delModal').modal('show');
	}
	$('.example img').zoomify();
	</script>